package kr.or.kosta.otr.persistence.messagetype;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;

import javax.annotation.Resource;

import kr.or.kosta.otr.vo.MessageTypeVO;

import org.springframework.stereotype.Repository;

import com.ibatis.sqlmap.client.SqlMapClient;
@Repository("MessageTypeDao")
public class MessageTypeDaoImpl implements MessageTypeDao{
	
	@Resource(name="sqlMapClient")
	private SqlMapClient sqlMapClient;
	
	@Override
	public ArrayList<MessageTypeVO> getAllMessageType() throws SQLException {
		return (ArrayList<MessageTypeVO>) sqlMapClient.queryForList("MessageType.getAllMessage");
	}

	@Override
	public MessageTypeVO getMessageType(HashMap<String, Object> map) throws SQLException {
		return (MessageTypeVO) sqlMapClient.queryForObject("MessageType.getMessage",map);
	}

}
